package edu.njust.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ibatis.annotations.Mapper;

public class Commodity {
    @JsonProperty("id")
    private int id;
    @JsonProperty("commodityTypeID")
    private int commodityTypeID;
    @JsonProperty("numID")
    private int numID;
    @JsonProperty("commodityName")
    private String commodityName;
    @JsonProperty("salePrice")
    private String salePrice;
    @JsonProperty("commodityTypeName")
    private String commodityTypeName;  //商品类别名称
    @JsonProperty("numName")
    private String numName;  //计量单位名称

    public Commodity() {
    }

    public Commodity(int id, int commodityTypeID, int numID, String commodityName, String salePrice, String commodityTypeName, String numName) {
        this.id = id;
        this.commodityTypeID = commodityTypeID;
        this.numID = numID;
        this.commodityName = commodityName;
        this.salePrice = salePrice;
        this.commodityTypeName = commodityTypeName;
        this.numName = numName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCommodityTypeID() {
        return commodityTypeID;
    }

    public void setCommodityTypeID(int commodityTypeID) {
        this.commodityTypeID = commodityTypeID;
    }

    public int getNumID() {
        return numID;
    }

    public void setNumID(int numID) {
        this.numID = numID;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(String salePrice) {
        this.salePrice = salePrice;
    }

    public String getCommodityTypeName() {
        return commodityTypeName;
    }

    public void setCommodityTypeName(String commodityTypeName) {
        this.commodityTypeName = commodityTypeName;
    }

    public String getNumName() {
        return numName;
    }

    public void setNumName(String numName) {
        this.numName = numName;
    }

    @Override
    public String toString() {
        return "Commodity{" +
                "id=" + id +
                ", commodityTypeID=" + commodityTypeID +
                ", numID=" + numID +
                ", commodityName='" + commodityName + '\'' +
                ", salePrice='" + salePrice + '\'' +
                ", commodityTypeName='" + commodityTypeName + '\'' +
                ", numName='" + numName + '\'' +
                '}';
    }
}
